package com.qf.spring002.service.impl;

import com.qf.spring002.service.OnePieceParser;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import java.io.IOException;

public class OnePieceParserImpl1 implements OnePieceParser {
    @Override
    public String parseOnePiece()  {
        Document doc = null;
        try {
            doc = Jsoup.connect("https://manhua.fffdm.com/002/").get();
        } catch (IOException e) {
            e.printStackTrace();
        }
        // 解析html文档
        Element element = doc.selectFirst("li.pure-u-1-2.pure-u-lg-1-4");

        final String text = element.text();
        return text;
    }
}
